package com.service.impl;

import com.dao.StudentDao;
import com.entity.Student;
import com.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentDao studentDao;
    @Override
    public int addStudent(Student student) {
        int i = studentDao.insertStudent(student);
        return i;

    }

    @Override
    public List<Student> queryallStudent() {
        List<Student> students = studentDao.selectStudent();
        return students;
    }
}
